package cn.anecansaitin.whimsy.common.register;

import cn.anecansaitin.whimsy.Whimsy;
import com.mojang.serialization.Codec;
import net.minecraft.core.particles.ItemParticleOption;
import net.minecraft.core.particles.ParticleType;
import net.minecraft.core.registries.Registries;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;
import org.jetbrains.annotations.NotNull;

public class ModParticles {
    public static final DeferredRegister<ParticleType<?>> PARTICLES = DeferredRegister.create(Registries.PARTICLE_TYPE, Whimsy.MODID);

    public static final DeferredHolder<ParticleType<?>, ParticleType<ItemParticleOption>> NO_PHYSICAL_ITEM_PARTICLE = PARTICLES.register("no_physical_item_particle", () -> new ParticleType<>(false, ItemParticleOption.DESERIALIZER) {
        @Override
        public @NotNull Codec<ItemParticleOption> codec() {
            return ItemParticleOption.codec(this);
        }
    });
}
